//
//  WeekCell.m
//  carowner
//
//  Created by apple on 2019/5/23.
//  Copyright © 2019 ggj. All rights reserved.
//

#import "WeekCell.h"

@implementation WeekCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if(self){
        self.backgroundColor = light_color;
        _topTip = [[UILabel alloc] init];
        _topTip.backgroundColor = color2;
        _topTip.text = @"今天";
        _topTip.font = smallFont;
        _topTip.textColor = [UIColor whiteColor];
        _topTip.textAlignment = NSTextAlignmentCenter;
        _topTip.hidden = YES;
        _dateTip = [[UILabel alloc] init];
        _dateTip.font = textFont;
        _dateTip.numberOfLines = 2;
        _dateTip.textAlignment = NSTextAlignmentCenter;
        
        [self addSubview:_dateTip];
        [self addSubview:_topTip];

        
        [_topTip mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.top.equalTo(self);
            make.size.mas_equalTo(CGSizeMake(30, 20));
        }];
        
        [_dateTip mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.top.right.bottom.equalTo(self);
        }];
    }
    return self;
}

@end
